home *** CD-ROM | disk | FTP | other *** search
/ .net (French) 1996 December / .net Magazine (FR) - Issue 02 - Dec 1996.iso / Utilpers / SUPERQUE / DATA.2 / FILTERS / PSINIT / ZSERVER.PS < prev    next >
Text File  |  1996-03-22  |  2KB  |  68 lines

  1. %!PS-Adobe-3.0
  2. %%BeginFile: zserver.ps
  3. %
  4. %   Copyright (c) 1995 Zenographics, Inc., Irvine, CA. All rights reserved
  5. %
  6.  
  7. % @@@Disable /setpageparams functionality until it's fully implemented.
  8. %
  9. statusdict /setpageparams known {statusdict /setpageparams undef}if
  10.  
  11. % Per-job parameters. Make sure systemdict isn't readonly when we do this.
  12. %
  13. <</Policies <</PageSize 1>> >> setpagedevice    %ignore page size errors
  14. (zsfont1.ps)runlibfile    % Can only define default fonts once the device is setup
  15.  
  16. systemdict /languagelevel psleveluseroption put    % user-req'd PS level (1 or 2)
  17.  
  18. % If this is a Level 1 product & we have a b/w device, undefine cmyk operators
  19. % to work around a bug in Pagemaker 5 which attempts to incorrectly use cmyk
  20. % operators if available.
  21. %
  22. % First, reset any cmyk operators with names like "~setcmykcolor" back to normal
  23.  
  24. [ (currentblackgeneration) (currentcmkycolor) (currentundercolorremoval)
  25.   (currentcolor) (currentcolorscreen) (currentcolortransfer)
  26.   (setblackgeneration) (setcmykcolor) (setundercolorremoval) 
  27.   (setcolor) (setcolorscreen) (setcolortransfer)
  28. ]
  29. dup
  30.     {
  31.     dup length 1 add string dup 0 (~) putinterval        %str1 str2
  32.     dup 1 3 index putinterval cvn                                %str1 name2
  33.     systemdict 1 index .knownget
  34.         {                                                                %str1 name2 value
  35.         systemdict exch 3 index cvn exch put                %str1 name2
  36.         systemdict 1 index undef
  37.         }
  38.     if
  39.     pop pop
  40.     }
  41. forall
  42.  
  43. % If Level 1 b/w printer, set cmyk operators to have ~ as first char
  44. systemdict /languagelevel .knownget {1 eq} {false} ifelse
  45.     {
  46.     currentdevice getdeviceprops .dicttomark
  47.     /Colors .knownget {1 eq} {true} ifelse
  48.         {
  49.         % redefine cmyk operators to have tilde (~) in front of name
  50.         dup
  51.             {
  52.             dup length 1 add string dup 0 (~) putinterval        %str1 str2
  53.             dup 1 3 index putinterval cvn                                %str1 name2
  54.             systemdict 2 index cvn .knownget
  55.                 {                                                                %str1 name2 value
  56.                 systemdict exch 2 index exch put                        %str1 name2
  57.                 systemdict 2 index undef
  58.                 }
  59.             if
  60.             pop pop
  61.             }
  62.         forall
  63.         }
  64.     if
  65.     }
  66. if
  67. pop
  68.